<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:rich="http://richfaces.org/rich">

<ui:composition template="#{webGlobal.url_template}/default/main.xhtml">
	<ui:define name="head">
		<link href="#{webGlobal.url_module}/team/r/css/main.css" rel="stylesheet" />
	</ui:define>
	
	<ui:define name="content">
		<div class="main-container" style="margin: 0 auto;">
			<div class="container" style="margin:200px auto;">
				
				<div class="panel panel-default">
					<div class="panel-heading">Team : #{teamDetail.oneTeam.name}</div>
					
					<h:panelGroup rendered="#{teamDetail.oneTeam.listPlayers.size() == 0}">
						<div class="panel-body">Aucun joueur</div>
					</h:panelGroup>
					<h:panelGroup rendered="#{teamDetail.oneTeam.listPlayers.size() > 0}">
						<table class="table">
							<thead>
								<tr>
									<th style="text-align: center;">Nom</th>
									<th style="text-align: center;">Prénom</th>
									<th style="text-align: center;">Poste</th>
									<th style="text-align: center;">Position</th>
								</tr>
							</thead>
							<tbody>
								<ui:repeat var="player" value="#{teamDetail.listPlayer}">
									<tr>
										<td>#{player.lastName}</td>
										<td>#{player.firstName}</td>
										<td>#{player.position}</td>
										<td>#{player.number}</td>
									</tr>
								</ui:repeat>
								<tr></tr>
							</tbody>
						</table>
					</h:panelGroup>
				</div>
				
				<h:form prependId="false">
					<h:commandButton action="#{teamDetail.goBackToDetailTournament()}"
						styleClass="btn btn-lg btn-primary btn-block" value="Retour au tournoi" />
				</h:form>
		    </div>
		</div>
 	</ui:define>
</ui:composition>
</html>